﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ASPNET.StarterKit.BusinessLogicLayer;
using ASPNET.StarterKit.DataAccessLayer;


public partial class InventoryTracker_TaxScheme : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
        
    protected void btnTaxSchemeSubmit_Click(object sender, EventArgs e)
    {
        DataAccess DA= DataAccessHelper.GetDataAccess();
        TaxScheme aTaxScheme=new TaxScheme(txtTaxName.Text,float.Parse(txtTaxPercent.Text));
        try
        {
            if(DA.CreateTaxScheme(aTaxScheme))
            {
                lblResult.Text="Success";
            }
else
            {
                lblResult.Text="Failure";
            }
        }
        catch(Exception ex)
            {
                lblResult.Text = ex.Message.ToString();
            }
    }
    }
       
